package com.breeze.blockchain.service.strategy.login;

import com.breeze.blockchain.common.enums.LoginTypeEnum;
import com.breeze.blockchain.mybatis.entity.UserDo;

/**
 * 登陆抽象策略
 *
 * @author breeze
 */
public sealed interface LoginStrategy
    permits EmailLoginStrategy, MobileLoginStrategy, PasswordLoginStrategy {

  /**
   * 返回登陆类型
   *
   * @return 登陆类型
   */
  LoginTypeEnum loginType();

  /** 登陆 */
  UserDo login(String username, String password);
}
